define(function(){
	return {
		search:'<section class="who-search"><input id="Js-who-search" class="form-control" placeholder="请输入汉字或拼音"></section>',
		detail:'<div id="Js-base"><section class="who-content">\
			<dl><dt>工号：</dt><dd><%code%></dd></dl>\
			<dl><dt>姓名：</dt><dd><%name%></dd></dl>\
			<dl><dt>性别：</dt><dd><%sex%></dd></dl>\
			<dl><dt>手机：</dt>\
				<dd>\
					<span data-type="mobile"><%mobile||"请填写手机号"%></span>\
					<%if(canEdit){%>\
						<span class="Js-item-edit who-item-editbtn glyphicon glyphicon-edit" aria-hidden="true"></span>\
					<%}%>\
				</dd>\
			</dl>\
			<dl><dt>座机：</dt>\
				<dd>\
					<span data-type="telphone"><%telphone||"请填写座机号"%></span>\
					<%if(canEdit){%>\
						<span class="Js-item-edit who-item-editbtn glyphicon glyphicon-edit" aria-hidden="true"></span>\
					<%}%>\
				</dd>\
			</dl>\
			<dl><dt>职位：</dt><dd><%title%></dd></dl>\
			<dl><dt>部门：</dt><dd><%department%></dd></dl>\
			<dl><dt>上级：</dt><dd>\
				<%sir_name||"不详"%>\
			</dd></dl>\
			<dl><dt>权限：</dt><dd>\
				<%per_name||"访客"%>\
			</dd></dl>\
		</section>\
		<section class="who-photo">\
			<%if(canEdit){%>\
				<input name="file" type="file" wx-upload="/web/upload.action"  wx-upload-param="type=1" wx-upload-set="Js-photo=path">\
			<%}%>\
			<%if(photo){%>\
				<img id="Js-photo" src="<%photo%>">\
			<%}else{%>\
				<%if(sex =="男"){%>\
					<img id="Js-photo" src="/res/images/who/default_male.jpg">\
				<%}else{%>\
					<img id="Js-photo" src="/res/images/who/default_female.jpg">\
				<%}%>\
			<%}%>\
			<%if(isWrite=="1"){%>\
				<div class="who-advanceSetting">\
					<button id="Js-advanceSetting" type="button" class="btn btn-success">高级设置</button>\
					<button id="Js-addEmp" type="button" class="btn btn-warning">添加新用户</button>\
				</div>\
			<%}%>\
		</section></div>',
		advance:'<div id="Js-advance" class="who-advance">\
			<section class="project-title"> 高级设置 <span class="back" id="Js-advance-addBack"></span> </section>\
			<section class="who-advance-content">\
				<dl><dt>设置权限：</dt><dd>\
					<div class="dropdown">\
					  <button class="btn btn-default dropdown-toggle" type="button" id="permissionDropMenu" data-toggle="dropdown">\
					    <a href="javascript:;"><%info.per_name || perlist.result[0]["name"]%></a>\
					    <span class="caret"></span>\
					  </button>\
					  <ul class="dropdown-menu" aria-labelledby="permissionDropMenu">\
						<%for(var i =0;i<perlist.result.length;i++){%>\
					    	<li><a href="javascript:;" data-id="<%perlist.result[i]["id"]%>"><%perlist.result[i]["name"]%></a></li>\
						<%}%>\
					  </ul>\
					</div>\
				</dd></dl>\
				<dl><dt>设置上级：</dt><dd>\
				<section class="who-search"><input id="Js-advance-sir" value="<%info.sir_name%>" class="form-control who-chooseSir" placeholder="上级名字"></section>\
				</dd></dl>\
				<button id="Js-advance-confirm" type="button" class="btn btn-primary btn-lg who-advance-confirm">确定</button>\
			</section>\
		</div>',
		addNew:'<div id="Js-advance" class="who-advance">\
			<section class="project-title"> 添加新用户 <span class="back" id="Js-addEmp-back"></span> </section>\
			<section class="who-add-content">\
				<form name="who-add" class="who-add-form" wx-validator-ajax action="/who/create" >\
					<dl>\
						<dt>工号：</dt><dd><input name="code" class="form-control" wx-validator-rule="required"/></dd>\
					</dl>\
					<dl>\
						<dt>姓名：</dt><dd><input name="name" class="form-control" wx-validator-rule="required"/></dd>\
					</dl>\
					<dl>\
						<dt>用户：</dt><dd><input name="username" placeholder="登录名,字母或数字组合" class="form-control" wx-validator-rule="required"/></dd>\
					</dl>\
					<dl>\
						<dt>性别：</dt><dd><label>男<input name="sex" type="radio" value="男" checked></label><label>女<input name="sex" type="radio" value="女"></label></dd>\
					</dl>\
					<dl>\
						<dt>职位：</dt><dd><input name="title" placeholder="软件工程师、客服经理等" class="form-control" wx-validator-rule="required"/></dd>\
					</dl>\
					<dl>\
						<dt>职级：</dt><dd><input name="level" placeholder="员工、部门经理等" class="form-control" wx-validator-rule="required"/></dd>\
					</dl>\
					<dl>\
						<dt>公司：</dt><dd><input name="company" value="沱沱工社事业中心" class="form-control" wx-validator-rule="required"/></dd>\
					</dl>\
					<dl><dt>部门：</dt><dd>\
						<div class="dropdown">\
						  <button class="btn btn-default dropdown-toggle" type="button" id="permissionDropMenu" data-toggle="dropdown">\
						    <a href="javascript:;"><%deplist[0]["name"]%></a>\
						    <span class="caret"></span>\
						  </button>\
						  <ul class="dropdown-menu" aria-labelledby="permissionDropMenu">\
							<%for(var i =0;i<deplist.length;i++){%>\
						    	<li><a href="javascript:;" data-type="department" data-val="<%deplist[i]["name"]%>"><%deplist[i]["name"]%></a></li>\
							<%}%>\
						  </ul>\
						</div>\
					</dd></dl>\
					<dl><dt>权限：</dt><dd>\
						<div class="dropdown">\
						  <button class="btn btn-default dropdown-toggle" type="button" id="permissionDropMenu" data-toggle="dropdown">\
						    <a href="javascript:;"><%perlist.result[0]["name"]%></a>\
						    <span class="caret"></span>\
						  </button>\
						  <ul class="dropdown-menu" aria-labelledby="permissionDropMenu">\
							<%for(var i =0;i<perlist.result.length;i++){%>\
						    	<li><a href="javascript:;" data-type="permission" data-val="<%perlist.result[i]["id"]%>"><%perlist.result[i]["name"]%></a></li>\
							<%}%>\
						  </ul>\
						</div>\
					</dd></dl>\
					<dl>\
						<dt>上级：</dt><dd><input id="Js-who-sir" class="form-control"/></dd>\
					</dl>\
					<dl>\
						<dt>入司：</dt><dd><input name="join_time" type="date" class="form-control" readonly/></dd>\
					</dl>\
					<input name="permission" type="hidden"/>\
					<input name="department" type="hidden"/>\
					<input name="sir_id" type="hidden"/>\
					<div id="Js-addNew-error" class="error-text"></div>\
					<input type="submit" class="btn btn-primary btn-lg" value="提交">\
				</form>\
			</section>\
		</div>',
	}
});